<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>动画</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        /* 水果 */
        .fruit{
            width: 200px;
            height: 300px;
            margin: 50px auto 0;
            position: relative;
            overflow: hidden;
        }

        .fruit-1 {
            width: 180px;
            height: 100px;
            background-color: rgba(0, 0, 0, .3);
            /* opacity: 0.2; */
            color: #ffffff;
            padding: 10px;
            position: absolute;
            top: 300px;
            left: 0;
            transition: all 1s ease;
        }

        .fruit-1 p {
            font-size: 13px;
            margin-top: 10px;
        }

        .fruit:hover .fruit-1 {
            top: 180px;
        }

        /* 风车 */
        .car {
            width: 400px;
            height: 400px;
            margin: 50px auto 0;
            animation: dong 1s linear 0s infinite;
        }

        @keyframes dong {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        /* 加载 */
        .loa {
            width: 300px;
            height: 158px;
            margin: 50px auto 0;
            border: 1px solid black;
        }

        .loa div {
            width: 30px;
            height: 100px;
            border-radius: 15px;
            background-color: red;
            margin: 15px;
            float: left;
            animation: dh 500ms ease 0s infinite alternate;
        }

        @keyframes dh {
            from {
                transform: scale(1, 1);
            }

            to {
                transform: scale(1, 0.5);
            }
        }

        .loa div:nth-child(1) {
            background-color: red;
        }

        .loa div:nth-child(2) {
            background-color: green;
            animation-delay: 100ms;
        }

        .loa div:nth-child(3) {
            background-color: blue;
            animation-delay: 200ms;
        }

        .loa div:nth-child(4) {
            background-color: yellow;
            animation-delay: 300ms;
        }

        .loa div:nth-child(5) {
            background-color: blueviolet;
            animation-delay: 400ms;
        }

        .loa p {
            text-align: center;
        }

        /* 走路 */
        .walking {
            width: 120px;
            height: 180px;
            border: 1px solid black;
            margin: 50px auto 0;
            position: relative;
            overflow: hidden;
        }

        .walking img {
            position: absolute;
            top: 0;
            left: 0;
            animation: hua 1s steps(8) 0s infinite;
        }

        @keyframes hua {
            from {
                left: 0;
            }

            to {
                left: -960px;
            }
        }

        /* 图片翻转 */
        #flip {
        width: 500px;
        height: 200px;
        margin: 0 auto;
        position: relative;
        border: 2px solid #000;
    }
    .flip-1 img {
        width: 200px;
        height: 200px;
        transition: all 1s linear;
        transform: rotateY(0deg);
        z-index: 1;
    }
    .flip-2 {
        width: 200px;
        height: 200px;
        text-align: center;
        line-height: 200px;
        background-color: pink;
        transform: rotateY(180deg);
        transition: all 1s linear;
    }
    .flip-3 {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
    }
    
    #flip:hover .flip-1 img{
        transform: rotateY(180deg);
        z-index: 0;
    }
    #flip:hover .flip-2 {
        transform: rotateY(0deg);
    }

    </style>
</head>

<body>
    <!-- 水果 -->
    <div class="fruit">
        <img src="./img/banner01.jpg">
        <div class="fruit-1">
            <h4>文字标题</h4>
            <p>图片文字说明，图片文字说明图片文字说明</p>
        </div>
    </div>
    <!-- 风车 -->
    <div class="car">
        <img src="./img/fengche.png">
    </div>
    <!-- 加载 -->
    <div class="loa">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <p>loading...</p>
    </div>
    <!-- 走路 -->
    <div class="walking">
        <img src="./img/walking.png">
    </div>
    <!-- 翻转 -->
    <div id="flip">
        <div class="flip-1">
            <img class="flip-3" src="./img/location_bg.jpg" alt="图片">
        </div>
        <div class="flip-2 flip-3">图片文字说明</div>
    </div>

</body>
<ml>